package modified_snake_game;

import javax.swing.JFrame;

@SuppressWarnings("serial")
public class Snake extends JFrame {

	/**
	 * New Snake game method that initializes all the variables
	 * - adds new board, default operation on close, size of map,
	 *   current location, title, visible, and if game is resizble.
	 */
	public Snake() {

		add(new Board());

		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		setSize(320, 340);
		setLocationRelativeTo(null);
		setTitle("Modified_Snake_Game");

		setResizable(false);
		setVisible(true);
	}

	/**
	 * Main method calling the snake game
	 * @param args
	 */
	public static void main(String[] args) {
		
		new Snake();
				
		Board b = new Board();
		
		
		/**
		 * When snake inGame() == false, start a new game
		 * ---Jordan, if you game get this to equal the "game over" screen then we can 
		 *    get it to loop whenever the game ends, or atleast make it an option
		 */
		if (b.isInGame() == false) {
			new Snake();
		}else {
			//new Snake();
		}
	}
}
